package top.mcwebsite.playandroid.business.qa.vm

import top.mcwebsite.playandroid.business.qa.model.QAReplayComment
import top.mcwebsite.playandroid.common.uiWidget.ErrorModel
import top.mcwebsite.playandroid.lib.mvi.base.IIntent
import top.mcwebsite.playandroid.lib.mvi.base.IUiEffect
import top.mcwebsite.playandroid.lib.mvi.base.IUiState


data class QADetailUiState(
    val message: String = "",
    val qaId: Long? = null,
    val errorModel: ErrorModel? = null,
    val replayComments: List<QAReplayComment> = emptyList()
): IUiState

sealed interface QADetailIntent : IIntent {
    data class InitQADetailIntent(val qaId: Long) : QADetailIntent
    data class ClickAnswerItemIntent(val index: Int): QADetailIntent
    data object BackIntent : QADetailIntent
}

sealed interface QADetailUiEffect : IUiEffect {
    data class GoAnswerPagerUiEffect(val index: Int): QADetailUiEffect
    data object BackUiEffect : QADetailUiEffect
}